<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>文章管理</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/Public/admin/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/Public/admin/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="/Public/admin/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/Public/admin/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="/Public/admin/css/app.css">
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script src="/Public/admin/js/jquery-3.2.1.min.js"></script>
    <script src="/Public/admin/js/ajaxupfile.js"></script>
</head>

<body data-type="widgets">
<script src="/Public/admin/js/theme.js"></script>
<script type="text/javascript">
    function ajaxFileUpload()
    {
        $("#testform").ajaxSubmit();
    }
</script>
$.post("admin.php?c=user&a=ajax", $("#testform").serialize(),
function(data){
alert("Data Loaded: " + data);
});
<div class="am-g tpl-g">
    <!-- 头部 -->

    <include file="Index/top_menu"/>

    <!-- 风格切换 -->
    <div class="tpl-skiner">
        <div class="tpl-skiner-toggle am-icon-cog"></div>
        <div class="tpl-skiner-content">
            <div class="tpl-skiner-content-title">选择主题</div>
            <div class="tpl-skiner-content-bar"><span
                    class="skiner-color skiner-white" data-color="theme-white"></span> <span
                    class="skiner-color skiner-black" data-color="theme-black"></span></div>
        </div>
    </div>
    <!-- 侧边导航栏 -->
    <include file="Index/left_menu"/>
    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">

                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">主页信息</div>
                            <div class="widget-function am-fr">
                                <a href="javascript:;" class="am-icon-cog"></a>
                            </div>
                        </div>
                        <div class="widget-body am-fr">

                            <form id="testform" enctype="multipart/form-data" class="am-form tpl-form-border-form tpl-form-border-br" method="post" action="admin.php?c=user&a=index">
                               <input type="hidden" name="flag" value="1">
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">博客标题 <span class="tpl-form-line-small-title">Title</span></label>
                                    <div class="am-u-sm-9">
                                        <input type="text" class="tpl-form-input" value="{$index.header_text}" name="header_text" id="header_text" placeholder="请输入标题文字">
                                        <small>请填写标题文字10-20字左右。</small>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-weibo" class="am-u-sm-3 am-form-label">博客顶部图片 <span class="tpl-form-line-small-title">Images</span></label>
                                    <div class="am-u-sm-9">
                                        <div class="am-form-group am-form-file">
                                            <div class="tpl-form-file-img">
                                                <img width="400px" height="200px" src="{$index.header_photo}" alt="">
                                            </div>
                                            <button id="" type="button" class="am-btn am-btn-danger am-btn-sm" onload="">
                                                <i class="am-icon-cloud-upload"></i> 添加封面图片</button>
                                            <!--<button class="am-btn am-btn-danger" style="">上传</button>-->
                                            <input  value="123" id="upfile"  name="header_photo" type="file" >

                                        </div>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-intro" class="am-u-sm-3 am-form-label">个人简介</label>
                                    <div class="am-u-sm-9">
                                        <textarea class="" rows="5" name="about_text" id="about_text" placeholder="请输入个人简介">{$index.about_text}</textarea>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-weibo" class="am-u-sm-3 am-form-label">简介图片 <span class="tpl-form-line-small-title">Images</span></label>
                                    <div class="am-u-sm-9">
                                        <div class="am-form-group am-form-file">
                                            <div class="tpl-form-file-img">
                                                <img width="400px" height="200px" src="{$index.about_photo}" alt="">
                                            </div>
                                            <button type="button" class="am-btn am-btn-danger am-btn-sm">
                                                <i class="am-icon-cloud-upload"></i> 添加封面图片</button>
                                            <input id="doc-form-file1" type="file" name="about_photo"  multiple>
                                        </div>

                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-intro" class="am-u-sm-3 am-form-label">底部功能栏</label>
                                    <div class="am-u-sm-9">
                                        <textarea class="" rows="5" id="footer_function" name="footer_function" placeholder="请输入文章内容">{$index.footer_function}</textarea>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-intro" class="am-u-sm-3 am-form-label">底部主页栏</label>
                                    <div class="am-u-sm-9">
                                        <textarea class="" rows="5" id="footer_home" name="footer_home" placeholder="请输入文章内容">{$index.footer_home}</textarea>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-intro" class="am-u-sm-3 am-form-label">底部说明</label>
                                    <div class="am-u-sm-9">
                                        <textarea class="" rows="5" id="footer_text" name="footer_text" placeholder="请输入文章内容">{$index.footer_text}</textarea>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <input type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success " value="提交"/>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        </div>
    </div>


</div>
<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>
<script src="/Public/admin/js/app.js"></script>

</body>

</html>